#ifndef STRAY_RESOURCE_MESH_FACTORY_H
#define STRAY_RESOURCE_MESH_FACTORY_H

#include "Mesh.h"

namespace Stray {
namespace Resource {

class MeshFactory
{
public:
	MeshPtr createMesh(const ResourceID& id);
	MeshPtr createMesh(const ResourceID& id,  const MeshCreationParam& param);
	void buildMesh(const MeshPtr& spMesh, const MeshCreationParam& param);

private:
	typedef Stray::Core::Graphics::VertexLayoutPtr VertexLayoutPtr;
	typedef Stray::Core::Graphics::VertexBufferPtr VertexBufferPtr;
	typedef Stray::Core::Graphics::IndexBufferPtr IndexBufferPtr;

	VertexLayoutPtr createVertexLayout(const MeshCreationParam::VertexLayoutTableArray& tableArray);
	VertexBufferPtr createVertexBuffer(const MeshCreationParam::VerticesPtr& vertices);
	IndexBufferPtr createIndexBuffer(const MeshCreationParam::IndicesPtr& indices);
	SubsetPtr createSubset(const MeshCreationParam::SubsetPtr& subset);
};

}
}

#endif